import request from "./http";
import { MaterialListDto } from "@/entity/Material";

// 获取素材列表
// export function getMaterialList(
//   param?: MaterialListDto,
//   cancelToken?: CancelTokenMode,
//   timeout: number = 3e4
// ): Promise<BaseListResult<MaterialEntity>> {
//   return request("material/list", param, timeout, 0, "post", undefined, { cancelToken });
// }

// 获取素材列表
export function getMaterialList(param?: MaterialListDto, cancelToken?: any, timeout: number = 3e4): any {
  return request("material/list", param, timeout, 0, "post", undefined, { cancelToken });
}

// 上传人员列表，用于下拉框选项
export function uploaderList(param?: any): Promise<any[]> {
  return request("material/uploaderList", param);
}

// 获取视频封面
export function getVideoFrame(param?: any): Promise<any> {
  return request("material/getVideoFrame", param);
}